package com.sise.rsc.service;

import com.sise.rsc.entity.Address;
import com.sise.rsc.entity.PackageAction;
import com.sise.rsc.repository.AddressRepository;
import com.sise.rsc.repository.PackageActionRepository;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CustomerService {
    @Resource
    private AddressRepository addressRepository;
    @Resource
    private PackageActionRepository packageActionRepository;

    public void saveAddress(Address address){
        addressRepository.save(address);
    }

    //通过快递号查找包裹的所有经历Action
    public List<PackageAction> searchPackageActionByPackageNo(String packageNO){
        return packageActionRepository.findAllActionByPackageNo(packageNO);
    }
}
